//tmpnam()+fopen() //两步操作，不是原子化。多进程/多线程，不安全
//tmpfile()
#include <stdio.h>
#include <stdlib.h>

void usage(void) { printf("Usage:...\n"); }

int main(int argc, char **argv) {
    if(argc != 2){ fprintf(stderr, "argc != 2\n"); usage(); exit(1); }

    FILE *fps = tmpfile();
    if(fps == NULL){ perror("fopen()"); exit(1); }
    // 读写
    fclose(fps); //关闭后文件就会被自动删除
    exit(0);
}
